from translate import Translator

class LanguageTrans():
    def __init__(self, mode):
        self.mode = mode
        if self.mode == "E2C":
            self.translator = Translator(from_lang="english", to_lang="chinese")
        if self.mode == "C2E":
            self.translator = Translator(from_lang="zh", to_lang="en")
    def trans(self, word):
        translation = self.translator.translate(word)
        return translation

def evaluate_cn(word, model=None, listq=None):
    translator = LanguageTrans("C2E")
    result = translator.trans(word)
    return result

if __name__ == '__main__':
    text = '你号'
    result = evaluate_cn(text)
    print(result)